var PanelView = function(parentElement,source){
	this.parentElement = parentElement;
	this.source = source;
	this.template = Handlebars.compile(this.source);

	return this;
};

PanelView.prototype = {
	render : function(context,options){
		this.parentElement.html(this.template(context));

		if(options){
			if(options.scrollable || options.scrollable == undefined){
				this.scroller = new iScroll(this.parentElement[0]);
			}
			if(options.scrollToBottom){
				this.scroller.scrollTo(0,this.scroller.maxScrollY);
			}
		}
		else {
			this.scroller = new iScroll(this.parentElement[0]);
		}
		return this;
	}
}